package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class CommentRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Post_Comment";

    private String diaryId;

    private String uuid;

    private String comment;

    private String targetUuid;

    public String getDiaryId() {
        return diaryId;
    }

    public void setDiaryId(String diaryId) {
        this.diaryId = diaryId;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getTargetUuid() {
        return targetUuid;
    }

    public void setTargetUuid(String targetUuid) {
        this.targetUuid = targetUuid;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        CommentRequestBody body = new CommentRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setDiaryId(getDiaryId());
        body.setUuid(getUuid());
        body.setComment(getComment());
        body.setTargetUuid(getTargetUuid());
        return body;
    }

    private class CommentRequestBody extends BaseTokenRequestBody {

        @SerializedName("DiaryID")
        private String diaryId;

        @SerializedName("Identity")
        private String uuid;

        @SerializedName("Content")
        private String comment;

        @SerializedName("ReplyIdentity")
        private String targetUuid;

        private CommentRequestBody() {
            setSv(BaseRequestConfig.SV_COMMENT);
        }

        public String getDiaryId() {
            return diaryId;
        }

        public void setDiaryId(String diaryId) {
            this.diaryId = diaryId;
        }

        public String getUuid() {
            return uuid;
        }

        public void setUuid(String uuid) {
            this.uuid = uuid;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public String getTargetUuid() {
            return targetUuid;
        }

        public void setTargetUuid(String targetUuid) {
            this.targetUuid = targetUuid;
        }
    }
}
